/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * JProductStorePanel.java
 *
 * Created on 2010-4-8, 8:50:29
 */

package cn.ekuma.epos.qkorder.link;

import cn.ekuma.epos.datalogic.I_DataLogicSales;
import com.openbravo.bean.Product;
import com.openbravo.bean.viewbean.ProductStoreView;
import com.openbravo.data.basic.BasicException;
import com.openbravo.data.gui.MessageInf;
import com.openbravo.pos.panels.link.AbstractProductLinkTablePanel;
import com.openbravo.pos.panels.link.model.ProductStoreVTableModel;


/**
 *
 * @author Administrator
 */
public class JSimilarProductStorePanel extends AbstractProductLinkTablePanel<ProductStoreView>{
    public JSimilarProductStorePanel(I_DataLogicSales dlSales) {
       super(dlSales,new ProductStoreVTableModel());
    }

    
    
    @Override
	public void baseBeanChanged(Product o) {
    	 try {
             tableModel.resert(dlSales.getSimilarProductStoreQBF(createValue()));
         } catch (BasicException ex) {
             new MessageInf(ex).show(this);
             tableModel.resert(null);
         }
		
	}


	@Override
    public Object createValue() throws BasicException {
        return new String[]{baseBeanID,baseBeanID};
    }

}
